"""CreateAdTable Migration."""

from masoniteorm.migrations import Migration


class CreateAdTable(Migration):
    def up(self):
        """
        Run the migrations.
        """
        with create("ads") as table:
            table.increments("id")
            table.string("name").comment("广告名称").nullable()
            table.enum("status", ["active", "inactive"]).default("active")
            table.timestamps()
    def down(self):
        """
        Revert the migrations.
        """
        self.schema.drop("ads")
